﻿
Partial Class pruebas_SeleccionaColumnas
    Inherits System.Web.UI.Page

    Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim cadena As String
        cadena = ""

        For Each Item In ListBox1.Items
            If Item.selected Then
                cadena = cadena + Item.ToString + ","
            End If



        Next
        Dim longitud_cadena As Integer
        longitud_cadena = cadena.Length
        cadena = cadena.Remove(longitud_cadena - 1, 1)

        Response .Redirect ("reporte.aspx?campos=" + cadena)
        'cadena = cadena + " From animal"
        TextBox1.Text = cadena

    End Sub
End Class
